<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/9
 * Time: 16:25
 */

namespace app\common\model;


use think\Model;

class Attachment extends Model
{
    /**
     * 主键
     * @var string
     */
    protected $pk = 'aid';

    /**
     * 表
     * @var string
     */
    protected $table = 'attachment';

    /**
     * 文章类型
     */
    const ARTICLE = 'article';

    /**
     * 类型自动转换
     * @var array
     */
    protected $type = [
        'tid'          => 'integer',
        'uid'          => 'integer',
        'created_time' => 'datetime',
        'updated_time' => 'datetime',
    ];
}